

const { DataTypes,Model  } = require('sequelize');
const db = require('../config/db');  // 确保 dbConfig 正确配置了数据库连接





const User = db.define(
    "user",
    {
        uid: {
            type: DataTypes.INTEGER,
            primaryKey: true,
            autoIncrement: true,
        },
        account: {
            type: DataTypes.STRING,
            allowNull: false,
        },
        phone: {
            type: DataTypes.STRING,
            allowNull: false,
        },
        pwd: {
            type: DataTypes.STRING,
            unique: false,
        },

    },
    {
        tableName: "yy_user",
    }
);

module.exports = User;